package com.his.server.utils.log;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class LogUtilFactory {
	
	private static final String MYCLASS_NAME = "com.his.server.utils.log.LogUtilFactory.class";
	private static final Log MYLOGGER = LogFactory.getLog(com.his.server.utils.log.LogUtilFactory.class);
	
	private LogUtilFactory()
    {
    }

    public static LogUtils getLog(Class clazz)
    {
        if(clazz == null)
        {
            return new LogUtils(MYCLASS_NAME, MYLOGGER);
        } else
        {
            String className = clazz.getName();
            Log logger = LogFactory.getLog(className);
            return new LogUtils(className, logger);
        }
    }
}
